﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using EntityFrameworkContrib.PostSharp4EF;
using CyclicReferences.Public;
using EditableBusinessObjects.Postsharp.Public;
using EFContrib.PS4EF.Tst.SchoolTests;

namespace EFContrib.PS4EF.Tst.InheritanceTests
{
    [Poco("InheritanceTypeConnection")]
    [CreateSerializeSurrogate("EntityFrameworkContrib.PostSharp4EF.ISerializationHelp, EntityFrameworkContrib.PostSharp4EF")]
    [DataContract(Namespace = "myNamespace", Name = "Employee")]
    public class Employee : Person
    {
        [DataMember]
        public ICollection<Employee> TeamMembers { get; set; }

        [DataMember]
        public Employee TeamLeader { get; set; }
    }



    [EditableBusinessObjectAttribute()]
    [CreateSerializeSurrogate("EditableBusinessObjects.Postsharp.Public.IEditableBusinessObject, EditableBusinessObjects.Postsharp.Public")]
    [DataContract(Namespace = "myNamespace", Name = "Employee")]
    public class EmployeeClient : PersonClient
    {
        [DataMember]
        public ICollection<EmployeeClient> TeamMembers { get; set; }

        [DataMember]
        public EmployeeClient TeamLeader { get; set; }

        public EmployeeClient()
        {
            TeamMembers = new List<EmployeeClient>();
        }
    }
}
